module frontend.ModelCache;
import frontend.Model;
import frontend.Types;
static import frontend.Parser;

ModelCache modelCache;

static this(){
	modelCache=new ModelCache;
}

class ModelCache{
	Model[char[]] models;
	
	Model loadModel(char[] path){
		//return frontend.Parser.loadModel(path);
		if(path in models is null){
			models[path]=(frontend.Parser.loadModel(path));
			return models[path];
		}
		return models[path].clone;
	}
}
